home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
CC_C
/
0668.ZIP
/
BSAVE.SCR
< prev
next >
Wrap
Text File
|
1987-04-03
|
981b
|
32 lines
N BSAVE.COM
A
XOR BH,BH
MOV BL,[80] ;Get argument length.
MOV Byte Ptr [BX+81],0 ;Convert argument to ASCIIZ.
MOV DX,82
MOV CX,0
MOV AH,3C ;Create a normal file.
INT 21
JB 140 ;Exit if error.
MOV BX,AX ;Else, filehandle in BX.
MOV AX,40
MOV DS,AX ;BIOS data segment.
MOV AX,B000 ;Monochrome buffer address.
MOV CX,1000 ;4K buffer.
CMP Word Ptr [63],3B4 ;Is it monochrome?
JZ 133 ;If yes, skip around.
ADD AX,800 ;Else, CGA buffer address.
ADD CX,3000 ;16K buffer.
MOV DS,AX ;Point to segment.
MOV DX,0 ;Point to offset.
MOV AH,40 ;Write image to file.
INT 21
MOV AH,3E ;Close the file.
INT 21
INT 20 ;Terminate.
RCX
42
W
Q